<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
    <property>
        <name>yarn.resourcemanager.hostname</name>
        <value>{{ master_ip }}</value>
    </property>
    <property>
        <name>yarn.resourcemanager.scheduler.class</name>
        <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler</value>
    </property>
    <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
    </property>
    {%- if yarn_memory_mb-%}
    <property>
        <name>yarn.nodemanager.resource.memory-mb</name>
        <value>{{ yarn_memory_mb }}</value>
    </property>
    {%- endif %}
    <property>
        <name>yarn.nodemanager.resource.cpu-vcores</name>
        <value>{{ worker_vcpus }}</value>
    </property>
    <property>
        <!-- This avoids a lot of ugly rounding errors. -->
        <name>yarn.scheduler.minimum-allocation-mb</name>
        <value>1</value>
    </property>
    <property>
        <name>yarn.nodemanager.env-whitelist</name>
        <value>JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_DISTCACHE,HADOOP_YARN_HOME,HADOOP_MAPRED_HOME</value>
    </property>
</configuration>
